//
//  LSZNewVideoTypeCollectionViewCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/7/5.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZNewVideoTypeCollectionViewCell.h"

@implementation LSZNewVideoTypeCollectionViewCell
-(id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageViewBack = [[UIImageView alloc]init];
        self.imageViewBack.frame = CGRectMake(0,0, ScreenWidth,0.556*ScreenWidth);
        [self addSubview:self.imageViewBack];

        self.labelName = [[UILabel alloc]init];
        self.labelName.textColor = [UIColor whiteColor];
        [LSZSpecialPackaging setAnySizeLabel: self.labelName  :19];
//        self.labelName.backgroundColor = [UIColor yellowColor];
         [self addSubview:self.labelName];

        self.labelContent = [[UILabel alloc]init];
        self.labelContent.textColor = [UIColor whiteColor];
        self.labelContent.numberOfLines = 2;
//        self.labelContent.backgroundColor = [UIColor redColor];
        [LSZSpecialPackaging setAnySizeLabel: self.labelContent  :13];
        [self addSubview:self.labelContent];
        if (ScreenWidth == 320) {
            //5
            self.labelContent.frame = CGRectMake(20,CGRectGetMaxY(self.imageViewBack.frame)-15-36,ScreenWidth-40,36);
            self.labelName.frame = CGRectMake(20,CGRectGetMinY(self.labelContent.frame)-5-30,ScreenWidth-40 ,30);
        }else if(ScreenWidth == 375){
            // 6 7
//            self.imageViewBack.frame = CGRectMake(0,0, ScreenWidth,340);
            self.labelContent.frame = CGRectMake(20,CGRectGetMaxY(self.imageViewBack.frame)-15-38,ScreenWidth-40,38);
            self.labelName.frame = CGRectMake(20,CGRectGetMinY(self.labelContent.frame)-5-32,ScreenWidth-40 ,32);
        }else {
            //plus
//            self.imageViewBack.frame = CGRectMake(0,0, ScreenWidth,350);
            self.labelContent.frame = CGRectMake(20,CGRectGetMaxY(self.imageViewBack.frame)-15-40,ScreenWidth-40,40);
            self.labelName.frame = CGRectMake(20,CGRectGetMinY(self.labelContent.frame)-5-34,ScreenWidth-40 ,34);
        }
    }
    return self;
}
@end
